package Demo4;

public class ThreadDemo {
    public static void main(String[] args) {
        /**
         * 优先级设置 ； setPriority()  getPriority()
         */
        MyRun myRun = new MyRun();
        Thread t1 = new Thread(myRun,"飞机");
        Thread t2 = new Thread(myRun,"坦克");
        t1.setPriority(Thread.MAX_PRIORITY); // 10
        t2.setPriority(Thread.MIN_PRIORITY); // 1
        t1.start();
        t2.start();
    }
}
